﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="HotelDetail.aspx.vb" Inherits="Travel.HotelDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .auto-style1
        {
            width: 100%;
        }
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="HotelName" HeaderText="HotelName" SortExpression="HotelName" />
                <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
                <asp:ImageField DataImageUrlField="Pictures" HeaderText="Pictures">
                    <ControlStyle BorderStyle="Double" Height="150px" Width="200px" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" ProviderName="<%$ ConnectionStrings:TravelConnectionString.ProviderName %>" SelectCommand="SELECT [HotelName], [Description], [Pictures] FROM [Hotels] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
        <asp:GridView ID="GridView2" runat="server"  AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author" />
                <asp:BoundField DataField="Comment" HeaderText="Comment" SortExpression="Comment" />
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" ProviderName="<%$ ConnectionStrings:TravelConnectionString.ProviderName %>" SelectCommand="SELECT [Author], [Comment], [Title] FROM [Comments] WHERE ([Hotel_fkid] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Hotel_fkid" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <table class="auto-style1">
        <tr>
            <td>Author</td>
            <td>
                <asp:TextBox ID="tb_Author" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>Title</td>
            <td>
                <asp:TextBox ID="tb_Title" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>Comment</td>
            <td>
                <asp:TextBox ID="tb_Comment" runat="server" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
    </table>
    <p>
        <asp:Button ID="btn_AddComment" runat="server" Text="Add Comment" />
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="TagsDataSource" DataTextField="Tag" DataValueField="ID" RepeatDirection="Horizontal">
        </asp:CheckBoxList>
        Add new Tags here : <asp:TextBox ID="tb_MultipleTags" runat="server" Width="248px"></asp:TextBox><br /> 
        <asp:SqlDataSource ID="TagsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" ProviderName="<%$ ConnectionStrings:TravelConnectionString.ProviderName %>" SelectCommand="SELECT [Tag], [ID] FROM [Tags]"></asp:SqlDataSource>
    </p>
    <p>
        <asp:Button ID="btn_Tag" runat="server" Text="Tag this Hotel" />
    </p>
    <p>
        <asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource3" DataTextField="Tag" DataValueField="ID"></asp:ListBox>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" ProviderName="<%$ ConnectionStrings:TravelConnectionString.ProviderName %>" SelectCommand="SELECT [ID], [Tag] FROM [Tags]"></asp:SqlDataSource>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Tag from List" />
    </p>
</asp:Content>
